package io.renren.setting;

import io.renren.common.utils.SpringContextUtils;
import io.renren.service.SysConfigService;

/**
 * @author winson
 * @CREATE 21 21:43
 */


public class CommonSettingUtils {

    private final static String APP_SETTING_KEY = "appSettingKey";
    private final static String ARTICLE_SETTING_KEY = "articleSettingKey";

    private final static SysConfigService sysConfigService = (SysConfigService) SpringContextUtils.getBean("sysConfigService");

    public static AppSetting getAppSetting(){
        return sysConfigService.getConfigObject( APP_SETTING_KEY, AppSetting.class );
    }

    public static ArticleSetting getArticleSetting(){
        return sysConfigService.getConfigObject( ARTICLE_SETTING_KEY, ArticleSetting.class );
    }

}
